<template>
	<sc-table-select
		clearable
		v-model="value"
		:apiObj="this.$API.equipitem.page"
		:props="{
			label: 'equipName',
			value: 'id',
		}"
		:tableWidth="600"
		@change="change">
		<template #header="{form, submit}">
			<el-form :inline="true" :model="form">
				<el-form-item>
					<el-input el-select v-model.trim="form.key" placeholder="输入设备编码或名称查询" />
				</el-form-item>
				<el-form-item>
					<el-button type="primary" @click="submit">查询</el-button>
				</el-form-item>
			</el-form>
		</template>

		<el-table-column prop="equipCode" label="设备编号" width="80"></el-table-column>
		<el-table-column prop="equipName" label="设备名称" width="120"></el-table-column>
		<el-table-column prop="equipModel" label="设备型号" width="120"></el-table-column>
		<el-table-column prop="equipTypeDesc" label="设备类型" width="80"></el-table-column>
		<el-table-column prop="lineCode" label="产线编号" width="80"></el-table-column>
		<el-table-column prop="opCode" label="工位编号"></el-table-column>
	</sc-table-select>
</template>

<script>
export default {
	emits: ['change'],
	data() {
		return {
			value: [],
		}
	},
	methods: {
		change (row) {
			this.$emit("change", row);
		}
	},
}
</script>
